Skip to content

Add AI-powered spec generation and LOC coverage tracking - #19

Merged
corvid-agent merged 2 commits into
mainfrom
feat/ai-generation-and-loc-coverage
Mar 19, 2026
Merged

Add AI-powered spec generation and LOC coverage tracking#19
corvid-agent merged 2 commits into
mainfrom
feat/ai-generation-and-loc-coverage

Conversation

@0xLeif

@0xLeif 0xLeif commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add ai module for generating spec content via external AI commands (e.g. claude -p, ollama run llama3) with automatic fallback to templates on failure
  • Support flat-file module discovery (e.g. src/config.rs → module config) alongside existing subdirectory-based detection
  • Track lines-of-code coverage in addition to file coverage, surfaced in both CLI output and JSON
  • Add --ai flag to generate command, plus ai_command and ai_timeout config fields
  • Improve generate to work when no specs exist yet; filter empty spec directories from module detection

Test plan

  • specsync generate scaffolds template specs for discovered modules
  • specsync generate --ai generates AI-powered specs when ai_command is configured
  • specsync coverage reports both file and LOC coverage
  • specsync coverage --json includes loc_coverage, loc_covered, loc_total, and uncovered_files
  • Flat source files (e.g. src/foo.rs) are detected as unspecced modules
  • AI failure gracefully falls back to template generation with a warning

🤖 Generated with Claude Code

0xLeif and others added 2 commits March 18, 2026 22:05
- Add ai module for generating specs via external AI commands (e.g. claude, ollama)
- Support flat-file module discovery alongside subdirectory-based modules
- Track lines-of-code coverage in addition to file coverage
- Add --ai flag to generate command with fallback to template on failure
- Add ai_command and ai_timeout config fields to SpecSyncConfig
- Improve generate command to work when no specs exist yet
- Filter empty spec directories from module detection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
corvid-agent added a commit that referenced this pull request Mar 19, 2026
…e from PR #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@corvid-agent
corvid-agent merged commit 2671b13 into main Mar 19, 2026
7 checks passed
@corvid-agent
corvid-agent deleted the feat/ai-generation-and-loc-coverage branch March 19, 2026 13:57
corvid-agent added a commit that referenced this pull request Mar 19, 2026
…e from PR #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
corvid-agent added a commit that referenced this pull request Mar 19, 2026
* docs: feature specsync generate as the headline for v1.2.0

The generate command and AI agent workflow were buried in a bullet list.
Now they have a dedicated README section with usage examples, custom
template docs, and a full generate→fill→validate→fix→enforce workflow.
CHANGELOG updated to reflect the actual feature additions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: document --ai flag, aiCommand/aiTimeout config, and LOC coverage from PR #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add --ai flag to all docs pages, switch to Rust-themed orange color scheme

- Add --ai flag, aiCommand, aiTimeout to CLI reference, configuration, and index pages
- Add ai.rs to architecture diagram
- Add LOC coverage fields to coverage JSON examples
- Replace blue accent with Rust-themed orange color scheme

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants